package com.zzhua.feign;

import com.zzhua.entity.Student;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.Collection;

// 需要实现FeignProviderClient接口,并且将该组件指定为回调
@Component
public class FeignError implements FeignProviderClient {
    @Override
    public Collection<Student> findAll() {
        ArrayList<Student> studentList = new ArrayList<>();
        studentList.add(new Student());
        return studentList;
    }

    @Override
    public String port() {
        return "FEIGN ERROR";
    }
}
